package com.example.demo.demo;

import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.Map;

/**
 * @Description
 * @Author
 * @Date 2019/11/26 12:07
 **/
public class B extends ExtendDemo{
    public static void getTrademarkDetectionToRedis(Integer pageData, int tryCount){
        Map<String, Object> params = new HashMap<>(2);
        params.put("pageData",pageData);
        try {
            if(tryCount<=0){
                return;
            }
            int i=1/0;
//            if(!ResponseCode.SUCCESS.getCode().equals(toRedis.getState())){
//                Thread.sleep(1000L);
//                iEbayService.getTrademarkDetectionToRedis(JSONObject.toJSONString(params));
//                tryCount--;
//                getTrademarkDetectionToRedis(pageData,tryCount);
//            }
        }catch (Exception e){
            try {
                Thread.sleep(1000L);
            } catch (InterruptedException e1) {
            }
            tryCount--;
            getTrademarkDetectionToRedis(pageData,tryCount);
        }

    }

    public static void main(String[] args) {
        getTrademarkDetectionToRedis(1,5);
    }
}
